From: Keir Fraser Date: Fri, 21 Jan 2011 15:57:18 +0000 (+0000) Subject: x86_32: Assert map_domian_page() not used too early. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10896^2~3 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=f2154f99137f7021e76d2f5ad7e3155ff29fafde;p=xen.git x86_32: Assert map_domian_page() not used too early. Signed-off-by: Fengzhe Zhang --- diff --git a/xen/arch/x86/x86_32/domain_page.c b/xen/arch/x86/x86_32/domain_page.c index 55a3380776..4fb563d4f0 100644 --- a/xen/arch/x86/x86_32/domain_page.c +++ b/xen/arch/x86/x86_32/domain_page.c @@ -53,6 +53,8 @@ void *map_domain_page(unsigned long mfn) perfc_incr(map_domain_page_count); v = mapcache_current_vcpu(); + /* Prevent vcpu pointer being used before initialize. */ + ASSERT((unsigned long)v != 0xfffff000); dcache = &v->domain->arch.mapcache; vcache = &v->arch.mapcache;